include(../../GSCommon.pri)

QT += core gui widgets network
QT += core5compat

TARGET = device_core
TEMPLATE = lib
DEFINES +=DEV_LIBRARY
INCLUDEPATH += $$IDE_APP_ROOT/GSLIbs/shared
INCLUDEPATH += $$IDE_APP_ROOT/GSLIbs/Core
INCLUDEPATH += $$IDE_APP_ROOT/GSLIbs/Utils
INCLUDEPATH += $$PWD

DESTDIR = $$clean_path($$IDE_APP_ROOT/bin)
LIB_DIR = $$clean_path($$IDE_APP_ROOT/bin)
win32 {
    DLLDESTDIR = $$IDE_APP_ROOT/bin
}
unix {
    DESTDIR = $$IDE_APP_ROOT/bin
    LIB_DIR = $$clean_path($$IDE_APP_ROOT/bin)
}

LIB_SUFFIX=""
CONFIG(debug, debug|release) { #debug
    win32 {
        LIB_SUFFIX=d
    }
}

LIBS += -L$$clean_path($$LIB_DIR) -lshared
LIBS += -L$$clean_path($$LIB_DIR) -lcore
LIBS += -L$$clean_path($$LIB_DIR) -lutils
#LIBS += -L$$clean_path($$LIB_DIR) -lqtpropertybrowser$$LIB_SUFFIX
win32 {
    LIBS += -lpthread -lwsock32 -lws2_32
}

HEADERS += \
    ConfigUtils.h \
    DataPack.h \
    Device.h \
    DevicePluginManager.h \
    IDevicePlugin.h \
    Modbus.h \
    Port/ComPort.h \
    Port/IPort.h \
    Port/NetPort.h \
    Port/ddsport.h \
    Port/simport.h \
    PortThread.h \
    SerialPortReMapping.h \
    devlibgloabal.h \
    qextserial/qextserialport.h \
    qextserial/qextserialport_global.h \
    qextserial/qextserialport_p.h

SOURCES += \
    ConfigUtils.cpp \
    DataPack.cpp \
    Device.cpp              \
    DevicePluginManager.cpp \
    Modbus.cpp \
    Port/ComPort.cpp \
    Port/NetPort.cpp \
    Port/ddsport.cpp \
    Port/simport.cpp \
    PortThread.cpp \
    SerialPortReMapping.cpp \
    qextserial/qextserialport.cpp

    win32 {
         SOURCES += qextserial/qextserialport_win.cpp
    }
    unix {
         SOURCES += qextserial/qextserialport_unix.cpp
    }
DISTFILES += \
    qextserial/LICENSE
